package com.xiaoKe.zhonghzu.ui.login;

import android.content.Intent;
import android.os.CountDownTimer;
import android.text.TextUtils;
import android.view.View;

import com.xiaoKe.zhonghzu.MainActivity;
import com.xiaoKe.zhonghzu.R;
import com.xiaoKe.zhonghzu.databinding.ActivityChangepassword2Binding;
import com.xiaoKe.zhonghzu.databinding.ActivityChangepasswordBinding;
import com.xiaoKe.zhonghzu.global.base.BaseActivity;
import com.xiaoKe.zhonghzu.global.tool.ToastUtils;
import com.xiaoKe.zhonghzu.ui.onClick.NoDoubleClickListener;


/**
 * @ProjectName : xiaoke-pad-zhongzhu
 * @Author : Shijingna
 * @Time : 2024/8/5 17:41
 * @Description : 忘记密码
 */
public class ChangePasswordActivity2 extends BaseActivity<ActivityChangepassword2Binding> {

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {
        NoDoubleClickListener noDoubleClickListener = new NoDoubleClickListener() {
            @Override
            protected void onNoDoubleClick(View view) {
                switch (view.getId()) {
                    case R.id.loginGo:
                        if (TextUtils.isEmpty(binding.password1.getText().toString())) {
                            ToastUtils.showLong("密码不能为空");
                            return;
                        } else if (TextUtils.isEmpty(binding.password2.getText().toString())) {
                            ToastUtils.showLong("重复密码不能为空");
                            return;
                        } else if (!binding.password2.getText().toString().equals(binding.password1.getText().toString())) {
                            ToastUtils.showLong("两次密码不相同");
                            return;
                        }
                        startActivity(new Intent(ChangePasswordActivity2.this, LoginActivityPwsWord.class));
                        break;


                }
            }
        };
        binding.loginGo.setOnClickListener(noDoubleClickListener);


    }


}
